package com.sgcc.operate.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sgcc.operate.domain.vo.RuleAttrDto;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sgcc.common.core.annotation.Excel;
import com.sgcc.common.core.web.domain.BaseEntity;

/**
 * 人群规则定义对象 o_crowd_rule
 * 
 * @author sgcc
 * @date 2021-03-23
 */
public class OCrowdRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 人群规则定义id */
    @Excel(name = "人群规则定义id")
    private String id;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String rulename;

    /** 规则描述 */
    @Excel(name = "规则描述")
    private String ruledesc;

    /** 人群规则状态 */
    @Excel(name = "人群规则状态")
    private String crowdstatus;

    /** 维护人 */
    @Excel(name = "维护人")
    private String modifyemp;

    /** 维护时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "维护时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date modifytime;

    /** 维护人单位 */
    @Excel(name = "维护人单位")
    private String modifyorg;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateDate;

    /** 逻辑删除标记（0：显示；1：隐藏） */
    @Excel(name = "逻辑删除标记", readConverterExp = "0=：显示；1：隐藏")
    private String delFlag;

    private String deptName;

    private String personNum;  // 人数
    private String createByName;        //
    private List<RuleAttrDto> ruleAttrs = new ArrayList<>();

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setRulename(String rulename) 
    {
        this.rulename = rulename;
    }

    public String getRulename() 
    {
        return rulename;
    }
    public void setRuledesc(String ruledesc) 
    {
        this.ruledesc = ruledesc;
    }

    public String getRuledesc() 
    {
        return ruledesc;
    }
    public void setCrowdstatus(String crowdstatus) 
    {
        this.crowdstatus = crowdstatus;
    }

    public String getCrowdstatus() 
    {
        return crowdstatus;
    }
    public void setModifyemp(String modifyemp) 
    {
        this.modifyemp = modifyemp;
    }

    public String getModifyemp() 
    {
        return modifyemp;
    }
    public void setModifytime(Date modifytime) 
    {
        this.modifytime = modifytime;
    }

    public Date getModifytime() 
    {
        return modifytime;
    }
    public void setModifyorg(String modifyorg) 
    {
        this.modifyorg = modifyorg;
    }

    public String getModifyorg() 
    {
        return modifyorg;
    }
    public void setCreateDate(Date createDate) 
    {
        this.createDate = createDate;
    }

    public Date getCreateDate() 
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate) 
    {
        this.updateDate = updateDate;
    }

    public Date getUpdateDate() 
    {
        return updateDate;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getPersonNum() {
        return personNum;
    }

    public void setPersonNum(String personNum) {
        this.personNum = personNum;
    }

    public String getCreateByName() {
        return createByName;
    }

    public void setCreateByName(String createByName) {
        this.createByName = createByName;
    }

    public List<RuleAttrDto> getRuleAttrs() {
        return ruleAttrs;
    }

    public void setRuleAttrs(List<RuleAttrDto> ruleAttrs) {
        this.ruleAttrs = ruleAttrs;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("rulename", getRulename())
            .append("ruledesc", getRuledesc())
            .append("crowdstatus", getCrowdstatus())
            .append("modifyemp", getModifyemp())
            .append("modifytime", getModifytime())
            .append("modifyorg", getModifyorg())
            .append("createBy", getCreateBy())
            .append("createDate", getCreateDate())
            .append("updateBy", getUpdateBy())
            .append("updateDate", getUpdateDate())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
